package com.cykj.pos.mapper;

import com.cykj.pos.domain.AizDeductionWallet;
import com.cykj.pos.domain.AizWithdrawalWallet;
import com.cykj.pos.domain.BizWalletNew;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cykj.pos.domain.WithdrawalRateTemplate;
import com.cykj.system.domain.WalletNew;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * bizWalletNewMapper接口
 *
 * @author weijianbo
 * @date 2025-01-20
 */
public interface BizWalletNewMapper extends BaseMapper<BizWalletNew> {

    BizWalletNew walletBalance(BizWalletNew bizWalletNew);

    BizWalletNew getWalletNewByUserId(@Param("userId") Long userId, @Param("channelId")Long channelId);

    void insertWithdrawalRateTemplate(WithdrawalRateTemplate withdrawalRateTemplate);

    void updateWithdrawalRateTemplate(WithdrawalRateTemplate withdrawalRateTemplate);

    WithdrawalRateTemplate withdrawalTemplateShowBack(WithdrawalRateTemplate withdrawalRateTemplate);

    AizWithdrawalWallet getWithdrawalWalletByUserId(@Param("userId")Long userId,@Param("channelId")Long channelId);

    AizDeductionWallet getDeductionWalletByUserId(Long userId);

    void updateAizWithdrawalWalletByUserId(AizWithdrawalWallet aizWithdrawalWallet);

    void insertWithdrawalWallet(AizWithdrawalWallet aizWithdrawalWallet);

    void insertDeductionWallet(AizDeductionWallet aizDeductionWallet);

    void updateWalletUserNameByUserId(@Param("userId")Long userId, @Param("nickName")String nickName);

    void updateWithdrawalWallet(AizWithdrawalWallet aizWithdrawalWallet);

    BigDecimal getWalletBalance(Long userId);

    BigDecimal getRewardBalance(Long userId);

    BigDecimal getDeductionBalance(Long userId);

    BizWalletNew getWalletNewByUserIdAndChannel(@Param("userId")Long userId, @Param("channelId")Long channelId);

    AizWithdrawalWallet getWithdrawalWalletByUserIdAndChannelId(@Param("userId")Long userId, @Param("channelId")Long channelId);
}
